package com.tencreat.mall.controller.admin;

import com.tencreat.common.core.HttpResult;
import com.tencreat.domain.mall.dto.MallMessageInformPushDTO;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.tencreat.common.core.controller.BaseController;
import com.tencreat.service.mall.IMallMessageInformService;

/**
 * 消息通知Controller
 *
 * @author tencreat
 * @date 2021-11-25
 */
@Api(tags="消息通知api")
@RestController
@RequestMapping("/system/inform")
public class MallMessageInformController extends BaseController {

    @Autowired
    private IMallMessageInformService mallMessageInformService;

    /**
     * 消息推送
     */
    @PostMapping("/push")
    HttpResult push(@RequestBody @Validated MallMessageInformPushDTO vo) {
        mallMessageInformService.push(vo);
        return HttpResult.ok();
    }

}
